package com.subaiwang.service.plastic;

import com.subaiwang.dao.plastic.PlasticMapper;
import com.subaiwang.pojo.Pages;
import com.subaiwang.pojo.Plastic;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("plasticService")
public class PlasticServiceImpl implements PlasticService{
    @Resource
    private PlasticMapper plasticMapper;
    @Override
    public void getPlastic(String typename, String brand, Pages pages) {
        List<Plastic> list=plasticMapper.getPlastic(typename,brand,((pages.getPageNo()-1)*pages.getPageSize()),pages.getPageSize());
        pages.setPlasticList(list);
    }

    @Override
    public int getCount(String typename,String brand) {
        return plasticMapper.getCount(typename,brand);
    }
}
